﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Sita.Entities;
using Sita.Data.Repositories;

namespace Sita.MainModule.Services
{
    public class WorkOrderService
    {
        WorkOrderRepository WorkOrderRepository;

        public WorkOrderService()
        {
            WorkOrderRepository = new WorkOrderRepository();
        }

        public IList<WorkOrder> GetPaginatedWorkOrdersByBussinesUnitID(int businessUnitID, int pageIndex, int pageSize, string sortColumn, bool ascending, out int totalRows)
        {
            return WorkOrderRepository.GetPaginatedByBusinessUnitID(businessUnitID, pageIndex, pageSize, sortColumn, ascending, out totalRows);
        }

        public WorkOrder GetFullWO(int woid)
        {
            return WorkOrderRepository.GetFullWO(woid);
        }
    }
}
